<div class="inmodal">
    <div class="modal-header">
        <h4 class="modal-title">{{operation | translate}}(ID:{{equipment.id}})</h4>
    </div>
    <div class="modal-body">
        <form role="form" name="form_equipment" novalidate class="form-horizontal">
            <div class="form-group"><label class="col-sm-4 control-label">{{'SETTING.NAME' | translate}}</label>
                <div class="col-sm-8"><input ng-model="equipment.name" type="text" name="equipmentname" class="form-control" required="">
                    <div class="m-t-xs" ng-show="form_equipment.equipmentname.$invalid && form_equipment.equipmentname.$dirty">
                        <small class="text-danger" ng-show="form_equipment.equipmentname.$error.required">{{'SETTING.INPUT_NAME' | translate}}</small>
                    </div>
                </div>
            </div>
            <div class="hr-line-dashed"></div>
            <div class="form-group"><label class="col-sm-4 control-label">{{'SETTING.IS_INPUT_COUNTED' | translate}}</label>
                <div class="col-sm-8">
                    <div class="checkbox checkbox-success">
                        <input id="chk_equipment_iscounted" type="checkbox" ng-model="equipment.is_input_counted" ng-checked="equipment.is_input_counted">
                        <label for="chk_equipment_iscounted">{{'SETTING.IS_INPUT_COUNTED' | translate}}</label>
                    </div>
                </div>
            </div>

            <div class="hr-line-dashed"></div>
            <div class="form-group"><label class="col-sm-4 control-label">{{'SETTING.IS_OUTPUT_COUNTED' | translate}}</label>
                <div class="col-sm-8">
                    <div class="checkbox checkbox-success">
                        <input id="chk_equipment_isoutputcounted" type="checkbox" ng-model="equipment.is_output_counted" ng-checked="equipment.is_output_counted">
                        <label for="chk_equipment_isoutputcounted">{{'SETTING.IS_OUTPUT_COUNTED' | translate}}</label>
                    </div>
                </div>
			    </div>
          <div class="hr-line-dashed"></div>
          <div class="form-group"><label class="col-sm-4 control-label">{{'EQUIPMENT.COST_CENTER' | translate}}</label>
              <div class="col-sm-8">
                  <ui-select ng-model="equipment.cost_center.id" theme="bootstrap" required>
                      <ui-select-match allow-clear="false" placeholder="{{'COMMON.PLACEHOLDER' | translate}}">{{$select.selected.name}}</ui-select-match>
                      <ui-select-choices repeat="costcenter.id as costcenter in costcenters | filter: $select.search">
                          <div ng-bind-html="costcenter.name | highlight: $select.search"></div>
                      </ui-select-choices>
                  </ui-select>
              </div>
          </div>
          <div class="hr-line-dashed"></div>
          <div class="form-group"><label class="col-sm-4 control-label">{{'EQUIPMENT.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
              <div class="col-sm-8"><input ng-model="equipment.description" type="text" name="equipmentdescription" class="form-control" >
                  <div class="m-t-xs" ng-show="form_equipment.equipmentdescription.$invalid && form_equipment.equipmentdescription.$dirty">
                      <small class="text-danger" ng-show="form_equipment.equipmentdescription.$error.required">{{'EQUIPMENT.INPUT_DESCRIPTION' | translate}}</small>
                  </div>
              </div>
          </div>
          <div class="form-group"><label class="col-sm-4 control-label">{{'COMMON.QR_CODE' | translate}} </label>
              <div class="col-sm-8">
                  <div>
                       <qrcode data="{{equipment.qrcode}}" version="1" error-correction-level="L" size="100" color="#fff" background="#000" download></qrcode>
                  </div>
              </div>
          </div>
        </form>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-white" ng-click="cancel()">{{'SETTING.CANCEL' | translate}}</button>
        <button type="button" ng-disabled="form_equipment.$invalid" class="btn btn-primary" ng-click="ok()">{{'SETTING.SAVE' | translate}}</button>
    </div>
</div>
